-- msg_random_cursor
-- Create by panyl
-- 随机数游标记录

return function(lpc)
    local buffer = Buffer.create(lpc.random_cursor);
    local offset = 1;
    local size = Buffer.size(buffer);
    local cursor = {};

    while offset <= size do
        local value = Buffer.getu16(buffer, offset);
        if value > 0 then
            local id = math.modf(offset / 2);
            cursor[id] = value;
        end

        -- 继续下一个
        offset = offset + 2;
    end

    ME.user.dbase:set("randomCursor", cursor);
end
